<template>
	<div class="status-container">
		<el-result :title="getLabel" :icon="type ? 'success' : 'error'"></el-result>
	</div>
</template>

<script>
export default {
	name: 'Status',
	props: {
		type: {
			type: Boolean,
			default: () => {
				return false
			},
		},
	},
	data() {
		return {
			label: '未连接',
		}
	},
	computed: {
		getLabel() {
			return this.type ? '已连接' : '未连接'
		},
	},
}
</script>

<style lang="less" scoped>
.status-container {
	display: flex;
	justify-content: center;
	align-items: center;
}
/deep/ .el-result__title {
	margin-top: 5px;
	p {
		font-size: 14px;
	}
}
</style>
